package com.junlaninfo;

/**
 * Created by 辉 on 2020/9/11.
 * 简单测试ThreadLocal的用法
 */
public class Test1  implements  Runnable{
    public static ThreadLocal<String> threadLocal1 = new ThreadLocal<String>();
    public static ThreadLocal<String> threadLocal2= new ThreadLocal<String>();
    public static void main(String[] args) {
        threadLocal1.set("xuexionghui");
        threadLocal2.set("薛雄辉");
        // threadLocal1.remove();
        System.out.println("从threadLocal的取值："+threadLocal1.get());
        System.out.println("从threadLocal的取值："+threadLocal2.get());
    }

    public void run() {

    }
}
